import 'package:daoyi_ui_admin_getx/app/modules/home/info/info_widget.dart';
import 'package:daoyi_ui_admin_getx/app/modules/mine/header.dart';
import 'package:daoyi_ui_admin_getx/app/routes/app_pages.dart';
import 'package:daoyi_ui_admin_getx/generated/locales.g.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'advertisement_widget.dart';
import 'function_button_widget.dart';
import 'mine_controller.dart';

class MineView extends GetView<MineController> {
  const MineView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(LocaleKeys.pages_mine_title.tr),
        elevation: 0,
        actions: [
          IconButton(
            icon: const Icon(Icons.settings),
            onPressed: () {
              Get.toNamed(Routes.SETTING_PAGE);
            },
          ),
        ],
      ),
      body: SafeArea(
        child: ListView(
          children: const [
            MineHeaderWidget(),
            FunctionButtonWidget(),
            AdvertisementWidget(),
            InfoWidget(
              showTitle: true,
            ),
          ],
        ),
      ),
    );
  }
}
